#pragma once
#include <SDL.h>
#include <vector>
using std::vector;

enum KeyCode
{
	GKEY_UNSUPPORTED = 0,
	GKEY_UP,
	GKEY_DOWN,
	GKEY_LEFT,
	GKEY_RIGHT,
	GKEY_W,
	GKEY_S,
	GKEY_A,
	GKEY_D,
	GKEY_P,
	GKEY_O,
	GKEY_B,
	GKEY_N,
	GKEY_M,
	GKEY_V,
	GKEY_COUNT
};

class KeyManager
{
private:
	static KeyManager *	instance;
	KeyManager(KeyManager const &){};
	KeyManager& operator=(KeyManager const &){};
	KeyManager();

	bool mKeys[GKEY_COUNT];

public:
	~KeyManager(void);
	static KeyManager *	get();

	void injectKeyDown(SDLKey key);
	void injectKeyUp(SDLKey key);
	bool isKeyDown(KeyCode key);
	bool isKeyUp(KeyCode key);
};

